﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;
using ModuleAddPlace.ViewModels;

namespace ModuleAddPlace.Commands
{
    public class SavePlaceCommand : ICommand
    {
        private IAddPlaceViewModel m_AddPlaceViewModel;

        public SavePlaceCommand(IAddPlaceViewModel addPlaceViewModel)
        {
            m_AddPlaceViewModel = addPlaceViewModel;
        }

        public bool CanExecute(object parameter)
        {
            return true;
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            m_AddPlaceViewModel.SaveNewPlace();
        }
    }
}
